The variety of applications available for devices like laptops, mobile phones, tablets, netbooks, and other computing devices have not only increased demand for such devices but have also made them a necessity. In addition to basic communication/computing capability of the devices, the applications installed on the devices may allow users to perform varied functions like access information, improve interactivity with customers, work from remote locations, contact administrative departments, access multimedia content, etc. Generally, there may be two types of applications, namely, native applications, which may be developed using native technologies and tend to work on devices for which they are developed using closed compiled code; and web-based applications, which may be developed using a language readable by everyone, for example, a markup language (for example, hypertext markup language 5 (HTML5)) or JavaScript.
Application developers may develop an application using a language that is widely acceptable as it becomes easier for them to release versions of the application for all platforms. However, as the code may be accessible (for example, in clear text), it may give rise to code protection problems. For instance, competitors may steal the code and reuse it for their own applications, therefore, saving upon the initial investments (for example, time and cost) needed to produce an equivalent code; or there may be pirated versions of the code that may be leaked onto the web. These versions may be accessed by users who may be able to install and execute the code without buying it.
A number of techniques have been employed to counter this problem. For example, before the code is transmitted, it is encrypted using a random key or a hash key. At the client (for example, a mobile phone or a laptop) or the computing device, the encrypted code is decrypted by using the random key or hash key transmitted by the server. However, once the code is decrypted, it can be captured and installed on any other client. Therefore, there is a need for a mechanism that solves the above problems and provides for a protection mechanism for web-based applications.